<template>
	<view>
		<view class="view1">
			<view>健康指数</view>
			<view>
				{{parseInt((arr.SBP+arr.SBP+arr.BP+arr.health+arr.hemameba+arr.red_blood+arr.hemoglobin+arr.HCT+arr.ALT+arr.AST+arr.GGT+arr.pulse+arr.indexa)/(arr.stature)*5)}}
			</view>
			<button type="primary" plain="true" @click="look(id)">查看全部项目</button>
			<view class="">
				您的健康指数为
				{{parseInt((arr.SBP+arr.SBP+arr.BP+arr.health+arr.hemameba+arr.red_blood+arr.hemoglobin+arr.HCT+arr.ALT+arr.AST+arr.GGT+arr.pulse+arr.indexa)/(arr.stature)*5)}}
				分，比
				{{parseInt((arr.SBP+arr.SBP+arr.BP+arr.health+arr.hemameba+arr.red_blood+arr.hemoglobin+arr.HCT+arr.ALT+arr.AST+arr.GGT+arr.pulse+arr.indexa)/(arr.stature)*4)}}
				%的人更健康
			</view>
		</view>
		<view class="view2">
			<view><text>历史对比</text></view>
			<view>
				<text>身高</text>
				<text>{{arr.stature}}cm</text>
			</view>
			<view>
				<text>体重指数BMI</text>
				<text>{{arr.weight/10}}</text>
			</view>
			<view>
				<text>收缩压</text>
				<text>{{arr.SBP}}mmHg</text>
			</view>
			<view>
				<text>舒张压</text>
				<text>{{arr.DBP}}mmHg</text>
			</view>
			<view>
				<text>血小板</text>
				<text>{{arr.BP}}*10^9/L</text>
			</view>
		</view>
		<view class="view3">
			<view>异常指数</view>
			<view>
				<text>血小板</text>
				<text>{{arr.BP==400?arr.BP:'无'}}</text>
			</view>
		</view>
		<view class="view4">
			<view>综述</view>
			
			<view class="view4-1">
				<view>综检结论</view>
				<view>
					1、{{arr.opinionFirst}}
				</view>
				<view>
					2、{{arr.opinionSecond}}
				</view>
			</view>
			<view class="view4-1">
				<view>医疗保健</view>
				<view>
					{{arr.conclusion}}
				</view>
			</view>
		</view>
		<view class="view5">
			<button type="primary" plain="true" @click="cancel">咨询医生</button>
			<button type="primary" plain="true" @click="go">快速挂号</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				arr:{}
			}
		},
		mounted(){
			const value = uni.getStorageSync('id')
			this.$http({   //获取我的体检详细
				url:"/getlookreport",
				data:{
					order_orderId:value
				}
			}).then((res)=>{
				console.log('单人体检',res)
				this.arr=res.data[0]
				// this.sum=this.arr.contentPrice+this.arr.phy_salePrice
			})
		},
		methods: {
			look(a){
				console.log(a)
				uni.navigateTo({
					url:'/pages/HXM/AllReport/AllReport',
				})
			},
			
			go(){
				console.log(1)
			},
			
			cancel(){
				console.log(2)
			}
		}
	}
</script>

<style lang="less">
	body{
		background: #F8F8F8;
		}
	
	.view1{
		margin: 0 auto;
		font-size: 30rpx;
		padding: 10rpx;
		margin: 20rpx;
		background: white;
		view{
			text-align: center;
			margin: 15rpx;
		}
		view:nth-child(2){
			text-align: center;
			font-size: 60rpx;
		}
		button{
			font-size: 30rpx;
			width: 300rpx;
			height: 60rpx;
			line-height: 60rpx;
		}
	}
	
	.view2{
		border: 1rpx solid #C1C1C1;
		margin: 20rpx;
		font-size: 30rpx;
		background: white;
		border-radius: 10rpx;
		view{
			height: 60rpx;
			line-height: 60rpx;
			border-bottom: 1rpx solid #C1C1C1;
			padding:0 20rpx;
			display: flex;
			justify-content: space-between;
		}
	}
	
	.view3{
		border: 1rpx solid #C1C1C1;
		margin: 20rpx;
		font-size: 30rpx;
		background: white;
		border-radius: 10rpx;
		view{
			height: 60rpx;
			line-height: 60rpx;
			border-bottom: 1rpx solid #C1C1C1;
			padding:0 20rpx;
			display: flex;
			justify-content: space-between;
		}
	}
	
	.view4{
		border: 1rpx solid #C1C1C1;
		margin: 20rpx;
		font-size: 30rpx;
		background: white;
		border-radius: 10rpx;
		view:nth-child(1){
			margin-left: 20rpx;
		}
		.view4-1{
			margin: 0 20rpx;
			view{
				margin: 20rpx 0;
			}
			view:nth-child(1){
				font-weight: 600;
			}
		}
	}
	
	.view5{
		display: flex;
		width: 100%;
		button{
			width: 50%;
			border: 1px solid #59B58D;
			color: #59B58D;
			border-radius: 0;
		}
		button:nth-child(2){
			background: #59B58D;
			color: white;
			border-left: 0;
		}
	}
	
	
</style>
